/* 添加页面专用样式 */

/* 表单容器优化 */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
}

/* 表单组间距优化 */
.form-group {
    margin-bottom: 25px;
}

/* 标签样式 */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

/* 输入框样式 */
input[type="text"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    background: white;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 文本区域样式 */
textarea {
    resize: vertical;
    min-height: 100px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 代码文本区域 */
.code-textarea {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    line-height: 1.5;
}

.code-textarea:focus {
    background: white;
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 复选框组 */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-group label {
    margin: 0;
    font-weight: 500;
}

/* 表单操作按钮 */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* 代码编辑器区域 */
.code-editor-section {
    margin: 30px 0;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.code-editor-section h4 {
    background: #f8fafc;
    padding: 20px;
    margin: 0;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
    font-size: 18px;
    font-weight: 600;
}

/* 代码标签页 */
.code-tabs {
    display: flex;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.code-tab {
    padding: 15px 25px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
    flex: 1;
    text-align: center;
}

.code-tab.active {
    color: #3b82f6;
    background: white;
    border-bottom-color: #3b82f6;
}

.code-tab:hover:not(.active) {
    color: #374151;
    background: #f9fafb;
}

/* 代码面板 */
.code-content {
    background: white;
}

.code-panel {
    display: none;
    padding: 25px;
}

.code-panel.active {
    display: block;
}

/* 表单提示 */
.form-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .form-container {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .code-tabs {
        flex-wrap: wrap;
    }

    .code-tab {
        flex: 1;
        min-width: 80px;
        padding: 12px 8px;
        font-size: 12px;
    }

    .code-panel {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 15px;
    }

    .code-editor-section h4 {
        padding: 15px;
        font-size: 16px;
    }

    .code-tab {
        padding: 10px 6px;
        font-size: 11px;
    }

    .code-panel {
        padding: 15px;
    }

    .checkbox-group {
        padding: 12px;
    }
}